# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=hexyl
pkgver=0.10.0
pkgrel=0
pkgdesc="Command-line hex viewer with colored output"
url="https://github.com/sharkdp/hexyl"
license="Apache-2.0 OR MIT"
arch="all !s390x !riscv64" # blocked by rust/cargo
makedepends="cargo"
source="https://github.com/sharkdp/hexyl/archive/v$pkgver/hexyl-$pkgver.tar.gz"

prepare() {
	default_prepare

	cargo fetch --locked
}

build() {
	cargo build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/hexyl "$pkgdir"/usr/bin/hexyl
}

sha512sums="
e5f22d8d3d6d49c2f0643972d33b290029f8a02f33a7c731420ae1621ba9a0736bfc888538b793383cb59cc28487ec14b65ad40cab9a93de04e0208573e0e117  hexyl-0.10.0.tar.gz
"
